<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" type="text/css" href="css/style.css"/>
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<link rel="stylesheet" href="css/bootstrap.min.css" />
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<style type="text/css">
		body{
			background-image:url(img/ww.jpg);
		}
		ul li{
			height:100px;
			width:100px;
		}
		.nav li a{
			font-size:18px;
			text-shadow:10px 5px 2px #fff;
			transition:width 2s, height 2s;
			-moz-transition:width 2s, height 2s, -moz-transform 2s; /* Firefox 4 */
			-webkit-transition:width 2s, height 2s, -webkit-transform 2s; /* Safari and Chrome */
			-o-transition:width 2s, height 2s, -o-transform 2s; /* Opera */
		}
		.nav li a:hover{
			font-size:22px;
			color:green;
			background-color:transparent;
			transform:rotate(360deg);
			-moz-transform:rotate(360deg); /* Firefox 4 */
			-webkit-transform:rotate(360deg); /* Safari and Chrome */
			-o-transform:rotate(360deg); /* Opera */
		}
		
	</style>
	
</head>
<body>
	<div id="wrapper">
		<div id="content">
			<nav>
				<ul id="appleNav">
					<li><a href="" title="Apple"><img src="img/dropbox2.png" alt="Apple Logo" /></a></li>
					<li><a href="" title="Support">欢迎你</a></li>
					<li><a href="main.jspx" title="Store">dropbox</a></li>
					<li><a href="" title="Mac">sharing</a></li>
					<li><a href="" title="iPod">link</a></li>
					<li><a href="" title="iPhone">event</a></li>
					<li><a href="" title="iPad">Get Started</a></li>
					<li><a href="" title="iTunes">安全退出</a></li>
					
					<li>
						<form>
							<input type="text" />
						</form>
					</li>
				</ul>
			</nav>
		</div>
	</div>
	<div class="container">
		<div class="row">
			<div class="span2">
				
					<ul class="nav nav-pills nav-stacked">
						<li ><a  data-toggle="modal" href="#myModal">upload</a>
						<div class="modal hide fade" id="myModal">
							<div class="modal-header">
								<button type="button" class="close" data-dismiss="modal">×</button>
								<h3>upload</h3>
							</div>
							<div class="modal-body">
							${sessionScope.doc}
								<form class="form-horizontal" method="post" action="folder.jspx?m=upload&h=${doc.fileid}" enctype="multipart/form-date">
								  <fieldset>
									<legend>Login</legend>
									<div class="control-group">
									  <label class="control-label" for="input01">文件名</label>
									  <div class="controls">
										<input type="text" class="input-xlarge" id="input01" name="desc">
									  </div>
									</div>
									<div class="control-group">
										<label class="control-label" for="input01">password</label>
										<div class="controls">
											<input type="file" class="input-xlarge" id="input01" name="document">
										</div>
									</div>
									<div class="modal-footer">
										<a href="#" class="btn" data-dismiss="modal">取消</a>
										<input type="submit" value="上传"/>
									</div>
								  </fieldset>
								</form>
							</div>
							
						</div>
						</li>
						
						<li><a href="folder.jspx?m=add2&n=${doc.fileid}">new folder</a></li>
						<li><a href="">分享</a></li>
						<li><a href="">已删除</a></li>
					</ul>
			</div>
			<div class="span7">
				<table class="table table-striped">
				  <thead>
					<tr>
					  <th>#号</th>
					  <th>文件名</th>
					  <th>文件属性</th>
					  <th>创建时间</th>
					</tr>
				  </thead>
				  <tbody>
				  	<tr>
				  		<td>--</td>
				  		<td>
				  			<img src="img/open_folder_green.png" alt="" />
				  			<form action="folder.jspx">
				  				<input type="text" name="name"/>
				  				<input type="submit" value="提交"/>
				  			</form>
				  		</td>
				  		<td>folder</td>
				  		<td>---</td>
				  	</tr>
				  	
				  <c:forEach items="${list}" var="d">
				  	<c:choose>
				  		<c:when test="${d.filename eq d.fileid }">
				  			<tr>
							  <td>--</td>
							  <td><a href="main.jspx?m=download&f=${d.fileid }"><img src="img/img/open_folder_green.png"/>${d.name}</a></td>
							   <td>${d.kind }</td>
							  <td>${d.time}</td>
							</tr>
				  		</c:when>
				  		<c:otherwise>
				  			<tr>
							  <td>${d.id }</td>
							  <td><a href="main.jspx?m=download&f=${d.fileid }">${d.name}</a></td>
							   <td>${d.kind }</td>
							  <td>${d.time}</td>
							</tr>
				  		</c:otherwise>
				  	</c:choose>
				  
					
				 </c:forEach>
				  </tbody>
				</table>
				
				
			</div>
		</div>
	
	</div>
	
	<script type="text/javascript">
		$(document).ready(function(){
				$("#showModel").click(function(){
					$("#myModal").modal();
				});
			});
	
	</script>
	
</body>
</html>